<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: LEAF/Inc/leaf-analysis.h Source File</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_127e6aa213d41105176fe0c3bbb2560c.html">LEAF</a></li><li class="navelem"><a class="el" href="dir_2638202b9749e6ce2c919e410b7e2f43.html">Inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">leaf-analysis.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*==============================================================================</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> leaf-analysis.h</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> Created: 25 Oct 2019 10:30:52am</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> Author:  Matthew Wang</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> ==============================================================================*/</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef LEAF_ANALYSIS_H_INCLUDED</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define LEAF_ANALYSIS_H_INCLUDED</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;leaf-global.h&quot;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;leaf-mempool.h&quot;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;leaf-distortion.h&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;leaf-math.h&quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;leaf-filters.h&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;leaf-envelopes.h&quot;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;leaf-delay.h&quot;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tEnvelopeFollower</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keywordtype">float</span> y;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keywordtype">float</span> a_thresh;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keywordtype">float</span> d_coeff;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    } _tEnvelopeFollower;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keyword">typedef</span> _tEnvelopeFollower* tEnvelopeFollower;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvelopefollower.html#ga5a7749052924bc7ed03051043b5e42bb">tEnvelopeFollower_init</a>          (tEnvelopeFollower* <span class="keyword">const</span> follower, <span class="keywordtype">float</span> attackThreshold, <span class="keywordtype">float</span> decayCoefficient, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvelopefollower.html#gacd6a2310494413b550ededdaed214d2a">tEnvelopeFollower_initToPool</a>    (tEnvelopeFollower* <span class="keyword">const</span> follower, <span class="keywordtype">float</span> attackThreshold, <span class="keywordtype">float</span> decayCoefficient, tMempool* <span class="keyword">const</span> mempool);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvelopefollower.html#ga9ff136abec8842d17d25205787370239">tEnvelopeFollower_free</a>          (tEnvelopeFollower* <span class="keyword">const</span> follower);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tenvelopefollower.html#gadd57dad9c08b2ada6e8c720077256d5a">tEnvelopeFollower_tick</a>          (tEnvelopeFollower* <span class="keyword">const</span> follower, <span class="keywordtype">float</span> sample);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvelopefollower.html#ga746d0a9698c22b21091cc6fad79faf85">tEnvelopeFollower_setDecayCoefficient</a>    (tEnvelopeFollower* <span class="keyword">const</span> follower, <span class="keywordtype">float</span> decayCoefficient);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvelopefollower.html#ga9d8d4762b016fa57939e5d733e164cb9">tEnvelopeFollower_setAttackThreshold</a>  (tEnvelopeFollower* <span class="keyword">const</span> follower, <span class="keywordtype">float</span> attackThreshold);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="comment">/* Zero Crossing Detector */</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tZeroCrossingCounter</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    {</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordtype">int</span> count;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keywordtype">int</span> maxWindowSize;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="keywordtype">int</span> currentWindowSize;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        <span class="keywordtype">float</span> invCurrentWindowSize;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <span class="keywordtype">float</span>* inBuffer;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        uint16_t* countBuffer;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordtype">int</span> prevPosition;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <span class="keywordtype">int</span> position;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    } _tZeroCrossingCounter;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    </div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="keyword">typedef</span> _tZeroCrossingCounter* tZeroCrossingCounter;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    </div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tzerocrossingcounter.html#ga8fed3441e5ac46750e3f7641d8b5d80b">tZeroCrossingCounter_init</a>         (tZeroCrossingCounter* <span class="keyword">const</span>, <span class="keywordtype">int</span> maxWindowSize, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tzerocrossingcounter.html#ga797b0ef62ada70b352a22426a9915ae6">tZeroCrossingCounter_initToPool</a>   (tZeroCrossingCounter* <span class="keyword">const</span>, <span class="keywordtype">int</span> maxWindowSize, tMempool* <span class="keyword">const</span> mempool);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tzerocrossingcounter.html#gaa1865545e8a1ac340af315e77547e75b">tZeroCrossingCounter_free</a>         (tZeroCrossingCounter* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    </div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tzerocrossingcounter.html#gab53550020f2625049537b65655af0053">tZeroCrossingCounter_tick</a>         (tZeroCrossingCounter* <span class="keyword">const</span>, <span class="keywordtype">float</span> input);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tzerocrossingcounter.html#ga7810cc03d693da0d9752b61f5320d01b">tZeroCrossingCounter_setWindowSize</a>    (tZeroCrossingCounter* <span class="keyword">const</span>, <span class="keywordtype">float</span> windowSize);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    </div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="comment">// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    </div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="comment">/* PowerEnvelopeFollower */</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tPowerFollower</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    {</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        </div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordtype">float</span> factor, oneminusfactor;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="keywordtype">float</span> curr;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        </div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    } _tPowerFollower;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    </div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keyword">typedef</span> _tPowerFollower* tPowerFollower;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    </div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpowerfollower.html#gab8b92e4b8a0819f2d0a779f3b20d3f25">tPowerFollower_init</a>         (tPowerFollower* <span class="keyword">const</span>, <span class="keywordtype">float</span> factor, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpowerfollower.html#ga726f0b8ec4ab97346fb8521934452a2e">tPowerFollower_initToPool</a>   (tPowerFollower* <span class="keyword">const</span>, <span class="keywordtype">float</span> factor, tMempool* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpowerfollower.html#ga479317d7fd22a86a832ebec92eae4782">tPowerFollower_free</a>         (tPowerFollower* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    </div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tpowerfollower.html#ga0b422a35ef8ccdd72b3db45fc53c1e96">tPowerFollower_tick</a>         (tPowerFollower* <span class="keyword">const</span>, <span class="keywordtype">float</span> input);</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tpowerfollower.html#ga0a423e1c15b581b4430112ed2897f6d2">tPowerFollower_getPower</a>     (tPowerFollower* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpowerfollower.html#gac7ab521ba7345c90b2455acc66a7caf1">tPowerFollower_setFactor</a>    (tPowerFollower* <span class="keyword">const</span>, <span class="keywordtype">float</span> factor);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="comment">// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    </div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="preprocessor">#define MAXOVERLAP 32</span></div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="preprocessor">#define INITVSTAKEN 64</span></div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;<span class="preprocessor">#define ENV_WINDOW_SIZE 1024</span></div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;<span class="preprocessor">#define ENV_HOP_SIZE 256</span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    </div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tEnvPD</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    {</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        </div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        <span class="keywordtype">float</span> buf[ENV_WINDOW_SIZE + INITVSTAKEN];</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        <span class="keywordtype">int</span> x_phase;                    <span class="comment">/* number of points since last output */</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordtype">int</span> x_period;                   <span class="comment">/* requested period of output */</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        <span class="keywordtype">int</span> x_realperiod;               <span class="comment">/* period rounded up to vecsize multiple */</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        <span class="keywordtype">int</span> x_npoints;                  <span class="comment">/* analysis window size in samples */</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <span class="keywordtype">float</span> x_result;                 <span class="comment">/* result to output */</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        <span class="keywordtype">float</span> x_sumbuf[MAXOVERLAP];     <span class="comment">/* summing buffer */</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        <span class="keywordtype">float</span> x_f;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        <span class="keywordtype">int</span> windowSize, hopSize, blockSize;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="keywordtype">int</span> x_allocforvs;               <span class="comment">/* extra buffer for DSP vector size */</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    } _tEnvPD;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    </div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    <span class="keyword">typedef</span> _tEnvPD* tEnvPD;</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    </div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvpd.html#ga49c2752feb9890d139e296e75ea74b9b">tEnvPD_init</a>             (tEnvPD* <span class="keyword">const</span>, <span class="keywordtype">int</span> windowSize, <span class="keywordtype">int</span> hopSize, <span class="keywordtype">int</span> blockSize, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvpd.html#ga31446fa14ee57bd0f19d260f4c748e2e">tEnvPD_initToPool</a>       (tEnvPD* <span class="keyword">const</span>, <span class="keywordtype">int</span> windowSize, <span class="keywordtype">int</span> hopSize, <span class="keywordtype">int</span> blockSize, tMempool* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvpd.html#ga28ade0e2893d6e94bca4dfa6cdd0f0ea">tEnvPD_free</a>             (tEnvPD* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    </div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tenvpd.html#ga73ca443b1b36dc5995bf1659fdb242ab">tEnvPD_tick</a>             (tEnvPD* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tenvpd.html#ga15bd0b8018ca2c67120053eb8cd1fc9a">tEnvPD_processBlock</a>     (tEnvPD* <span class="keyword">const</span>, <span class="keywordtype">float</span>* in);</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    </div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="comment">// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    </div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;<span class="preprocessor">#define DEFBLOCKSIZE 1024</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="preprocessor">#define DEFTHRESHOLD 6</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;<span class="preprocessor">#define DEFATTACK    10</span></div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;<span class="preprocessor">#define DEFRELEASE    10</span></div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    </div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tAttackDetection</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;    {</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        <span class="keywordtype">float</span> env;</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        </div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        <span class="comment">//Attack &amp; Release times in msec</span></div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;        <span class="keywordtype">int</span> atk;</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;        <span class="keywordtype">int</span> rel;</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;        </div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;        <span class="comment">//Attack &amp; Release coefficients based on times</span></div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;        <span class="keywordtype">float</span> atk_coeff;</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;        <span class="keywordtype">float</span> rel_coeff;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;        </div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;        <span class="keywordtype">int</span> blocksize;</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        <span class="keywordtype">int</span> samplerate;</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        </div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;        <span class="comment">//RMS amplitude of previous block - used to decide if attack is present</span></div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;        <span class="keywordtype">float</span> prevAmp;</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        </div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        <span class="keywordtype">float</span> threshold;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    } _tAttackDetection;</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    </div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    <span class="keyword">typedef</span> _tAttackDetection* tAttackDetection;</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    </div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tattackdetection.html#gaa7cf7c473a720eb6e034661a92a9164a">tAttackDetection_init</a>           (tAttackDetection* <span class="keyword">const</span>, <span class="keywordtype">int</span> blocksize, <span class="keywordtype">int</span> atk, <span class="keywordtype">int</span> rel, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tattackdetection.html#ga159b77e3617708f63d34705f66891eca">tAttackDetection_initToPool</a>     (tAttackDetection* <span class="keyword">const</span>, <span class="keywordtype">int</span> blocksize, <span class="keywordtype">int</span> atk, <span class="keywordtype">int</span> rel, tMempool* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tattackdetection.html#gac0cecbd3eb9478a8ac62ad056b4e65e8">tAttackDetection_free</a>           (tAttackDetection* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;    </div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tattackdetection.html#ga330419a7bcf2aea460cbb8341d0cc7a1">tAttackDetection_setBlocksize</a>   (tAttackDetection* <span class="keyword">const</span>, <span class="keywordtype">int</span> size);</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tattackdetection.html#gafc1088d0fc65cb8c9ca3e219dc6ee23e">tAttackDetection_setSamplerate</a>  (tAttackDetection* <span class="keyword">const</span>, <span class="keywordtype">int</span> inRate);</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tattackdetection.html#gae1258e29699c07368168a5a06e847c1c">tAttackDetection_setAttack</a>      (tAttackDetection* <span class="keyword">const</span>, <span class="keywordtype">int</span> inAtk);</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tattackdetection.html#ga849d76be546d42e00dcfaee4ca326adb">tAttackDetection_setRelease</a>     (tAttackDetection* <span class="keyword">const</span>, <span class="keywordtype">int</span> inRel);</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tattackdetection.html#gafc46d23c20523048eaf45a68e146dbcf">tAttackDetection_setThreshold</a>   (tAttackDetection* <span class="keyword">const</span>, <span class="keywordtype">float</span> thres);</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tattackdetection.html#ga628b4e4305fb135f7f363b94a209cb37">tAttackDetection_detect</a>         (tAttackDetection* <span class="keyword">const</span>, <span class="keywordtype">float</span> *in);</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;    </div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;    </div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;<span class="preprocessor">#define SNAC_FRAME_SIZE 1024           // default analysis framesize // should be the same as (or smaller than?) PS_FRAME_SIZE</span></div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;<span class="preprocessor">#define DEFOVERLAP 1                // default overlap</span></div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;<span class="preprocessor">#define DEFBIAS 0.2f        // default bias</span></div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;<span class="preprocessor">#define DEFMINRMS 0.003f   // default minimum RMS</span></div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;<span class="preprocessor">#define SEEK 0.85f       // seek-length as ratio of framesize</span></div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;    </div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tSNAC</div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;    {</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;        </div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;        <span class="keywordtype">float</span>* inputbuf;</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;        <span class="keywordtype">float</span>* processbuf;</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        <span class="keywordtype">float</span>* spectrumbuf;</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;        <span class="keywordtype">float</span>* biasbuf;</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;        uint16_t timeindex;</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;        uint16_t framesize;</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;        uint16_t overlap;</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;        uint16_t periodindex;</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;        </div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;        <span class="keywordtype">float</span> periodlength;</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;        <span class="keywordtype">float</span> fidelity;</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;        <span class="keywordtype">float</span> biasfactor;</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;        <span class="keywordtype">float</span> minrms;</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;        </div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;    } _tSNAC;</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;    </div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;    <span class="keyword">typedef</span> _tSNAC* tSNAC;</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;    </div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsnac.html#ga5f4005dba1c0470e84ae6bc6845c6d27">tSNAC_init</a>          (tSNAC* <span class="keyword">const</span>, <span class="keywordtype">int</span> overlaparg, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsnac.html#ga9779c23ab83bf93c8df11a6b4982c0b2">tSNAC_initToPool</a>    (tSNAC* <span class="keyword">const</span>, <span class="keywordtype">int</span> overlaparg, tMempool* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsnac.html#gad7fc6ce1e80847dfcd9da75d4c734f12">tSNAC_free</a>          (tSNAC* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;    </div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    <span class="keywordtype">void</span>    tSNAC_ioSamples     (tSNAC *s, <span class="keywordtype">float</span> *in, <span class="keywordtype">int</span> size);</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsnac.html#gab6a4ff9c52fb26d19f3bc4d080f91845">tSNAC_setOverlap</a>    (tSNAC *s, <span class="keywordtype">int</span> lap);</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsnac.html#ga3dbb9845079ebe1b3dbba647180a1168">tSNAC_setBias</a>       (tSNAC *s, <span class="keywordtype">float</span> bias);</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsnac.html#ga777b3cb40c7dcb7826b0945358ffe1ec">tSNAC_setMinRMS</a>     (tSNAC *s, <span class="keywordtype">float</span> rms);</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;    </div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    <span class="comment">/*To get freq, perform SAMPLE_RATE/snac_getperiod() */</span></div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tsnac.html#ga71074b5888fe76260f3c1fae7e2aeec8">tSNAC_getPeriod</a>     (tSNAC *s);</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tsnac.html#ga8568190ff50745df3b220f9f8dba3289">tSNAC_getFidelity</a>   (tSNAC *s);</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;    </div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;<span class="preprocessor">#define DEFPITCHRATIO 1.0f</span></div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;<span class="preprocessor">#define DEFTIMECONSTANT 100.0f</span></div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;<span class="preprocessor">#define DEFHOPSIZE 64</span></div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;<span class="preprocessor">#define DEFWINDOWSIZE 64</span></div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;<span class="preprocessor">#define FBA 20</span></div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;<span class="preprocessor">#define HPFREQ 20.0f</span></div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;    </div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tPeriodDetection</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;    {</div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;        </div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;        tEnvPD env;</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;        tSNAC snac;</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;        <span class="keywordtype">float</span>* inBuffer;</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;        <span class="keywordtype">float</span>* outBuffer;</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;        <span class="keywordtype">int</span> frameSize;</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;        <span class="keywordtype">int</span> bufSize;</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;        <span class="keywordtype">int</span> framesPerBuffer;</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;        <span class="keywordtype">int</span> curBlock;</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;        <span class="keywordtype">int</span> lastBlock;</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;        <span class="keywordtype">int</span> i;</div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;        <span class="keywordtype">int</span> indexstore;</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;        <span class="keywordtype">int</span> iLast;</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;        <span class="keywordtype">int</span> index;</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;        <span class="keywordtype">float</span> period;</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;        </div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;        uint16_t hopSize;</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;        uint16_t windowSize;</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;        uint8_t fba;</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;        </div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;        <span class="keywordtype">float</span> timeConstant;</div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;        <span class="keywordtype">float</span> radius;</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;        <span class="keywordtype">float</span> max;</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;        <span class="keywordtype">float</span> lastmax;</div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;        <span class="keywordtype">float</span> deltamax;</div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;        </div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;        <span class="keywordtype">float</span> fidelityThreshold;</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;        </div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;        <span class="keywordtype">float</span> history;</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;        <span class="keywordtype">float</span> alpha;</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;        <span class="keywordtype">float</span> tolerance;</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;        </div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;    } _tPeriodDetection;</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;    </div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;    <span class="keyword">typedef</span> _tPeriodDetection* tPeriodDetection;</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    </div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;    <span class="keywordtype">void</span>    tPeriodDetection_init               (tPeriodDetection* <span class="keyword">const</span>, <span class="keywordtype">float</span>* in, <span class="keywordtype">int</span> bufSize, <span class="keywordtype">int</span> frameSize, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;    <span class="keywordtype">void</span>    tPeriodDetection_initToPool         (tPeriodDetection* <span class="keyword">const</span>, <span class="keywordtype">float</span>* in, <span class="keywordtype">int</span> bufSize, <span class="keywordtype">int</span> frameSize, tMempool* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetection.html#ga94c9cff1d6cb0f0d6a70fdeb8764cdb0">tPeriodDetection_free</a>               (tPeriodDetection* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;    </div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tperioddetection.html#ga18cf97615547a615aec4b183da82e8ee">tPeriodDetection_tick</a>               (tPeriodDetection* <span class="keyword">const</span>, <span class="keywordtype">float</span> sample);</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tperioddetection.html#ga04f0fa73e75e8fc128243515b039c474">tPeriodDetection_getPeriod</a>          (tPeriodDetection* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;    <span class="keywordtype">float</span>   tPeriodDetection_getFidelity        (tPeriodDetection* pd);</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetection.html#ga207a7ec884eebc58c9cd9f17518d5a1b">tPeriodDetection_setHopSize</a>         (tPeriodDetection* <span class="keyword">const</span>, <span class="keywordtype">int</span> hs);</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetection.html#ga9a3ed4fe9806b0ee691b56090cef4339">tPeriodDetection_setWindowSize</a>      (tPeriodDetection* <span class="keyword">const</span>, <span class="keywordtype">int</span> ws);</div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetection.html#ga2249345fb1cb419173b35ef258cf4248">tPeriodDetection_setFidelityThreshold</a>(tPeriodDetection* <span class="keyword">const</span>, <span class="keywordtype">float</span> threshold);</div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetection.html#ga95602fa326fda0ab685a626508166d15">tPeriodDetection_setAlpha</a>           (tPeriodDetection* <span class="keyword">const</span>, <span class="keywordtype">float</span> alpha);</div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetection.html#ga49b5e95b84c6e101abac2ab7ec0cdebd">tPeriodDetection_setTolerance</a>       (tPeriodDetection* <span class="keyword">const</span>, <span class="keywordtype">float</span> tolerance);</div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;    </div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;    </div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;    <span class="comment">// Maybe keep from here to tPeriodDetector internal?</span></div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tZeroCrossingInfo</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;    {</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;        </div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;        </div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;        <span class="keywordtype">float</span> _before_crossing;</div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;        <span class="keywordtype">float</span> _after_crossing;</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;        </div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;        <span class="keywordtype">float</span>             _peak;</div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;        <span class="keywordtype">int</span>               _leading_edge;<span class="comment">// = undefined_edge; int_min</span></div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;        <span class="keywordtype">int</span>               _trailing_edge;<span class="comment">// = undefined_edge;</span></div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;        <span class="keywordtype">float</span>             _width;<span class="comment">// = 0.0f;</span></div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;    } _tZeroCrossingInfo;</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;    </div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;    <span class="keyword">typedef</span> _tZeroCrossingInfo* tZeroCrossingInfo;</div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;    </div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;    <span class="keywordtype">void</span>    tZeroCrossingInfo_init  (tZeroCrossingInfo* <span class="keyword">const</span>, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;    <span class="keywordtype">void</span>    tZeroCrossingInfo_initToPool    (tZeroCrossingInfo* <span class="keyword">const</span>, tMempool* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;    <span class="keywordtype">void</span>    tZeroCrossingInfo_free  (tZeroCrossingInfo* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;    </div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingInfo_tick(tZeroCrossingInfo* <span class="keyword">const</span>, <span class="keywordtype">float</span> s);</div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingInfo_getState(tZeroCrossingInfo* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;    <span class="keywordtype">void</span>    tZeroCrossingInfo_updatePeak(tZeroCrossingInfo* <span class="keyword">const</span>, <span class="keywordtype">float</span> s, <span class="keywordtype">int</span> pos);</div>
<div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingInfo_period(tZeroCrossingInfo* <span class="keyword">const</span>, tZeroCrossingInfo* <span class="keyword">const</span> next);</div>
<div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;    <span class="keywordtype">float</span>   tZeroCrossingInfo_fractionalPeriod(tZeroCrossingInfo* <span class="keyword">const</span>, tZeroCrossingInfo* <span class="keyword">const</span> next);</div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingInfo_getWidth(tZeroCrossingInfo* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;    </div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;    </div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tZeroCrossingCollector</div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;    {</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;        </div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;        </div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;        tZeroCrossingInfo* _info;</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _size;</div>
<div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _pos;</div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _mask;</div>
<div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;        </div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;        <span class="keywordtype">float</span>                _prev;<span class="comment">// = 0.0f;</span></div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;        <span class="keywordtype">float</span>                _hysteresis;</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;        <span class="keywordtype">int</span>                  _state;<span class="comment">// = false;</span></div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;        <span class="keywordtype">int</span>                  _num_edges;<span class="comment">// = 0;</span></div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;        <span class="keywordtype">int</span>                  _window_size;</div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;        <span class="keywordtype">int</span>                  _frame;<span class="comment">// = 0;</span></div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;        <span class="keywordtype">int</span>                  _ready;<span class="comment">// = false;</span></div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;        <span class="keywordtype">float</span>                _peak_update;<span class="comment">// = 0.0f;</span></div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;        <span class="keywordtype">float</span>                _peak;<span class="comment">// = 0.0f;</span></div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;    } _tZeroCrossingCollector;</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;    </div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;    <span class="keyword">typedef</span> _tZeroCrossingCollector* tZeroCrossingCollector;</div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;    </div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;    <span class="keywordtype">void</span>    tZeroCrossingCollector_init  (tZeroCrossingCollector* <span class="keyword">const</span>, <span class="keywordtype">int</span> windowSize, <span class="keywordtype">float</span> hysteresis, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;    <span class="keywordtype">void</span>    tZeroCrossingCollector_initToPool    (tZeroCrossingCollector* <span class="keyword">const</span>, <span class="keywordtype">int</span> windowSize, <span class="keywordtype">float</span> hysteresis, tMempool* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;    <span class="keywordtype">void</span>    tZeroCrossingCollector_free  (tZeroCrossingCollector* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;    </div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingCollector_tick(tZeroCrossingCollector* <span class="keyword">const</span>, <span class="keywordtype">float</span> s);</div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingCollector_getState(tZeroCrossingCollector* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;    </div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingCollector_getNumEdges(tZeroCrossingCollector* <span class="keyword">const</span> zc);</div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingCollector_getCapacity(tZeroCrossingCollector* <span class="keyword">const</span> zc);</div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingCollector_getFrame(tZeroCrossingCollector* <span class="keyword">const</span> zc);</div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingCollector_getWindowSize(tZeroCrossingCollector* <span class="keyword">const</span> zc);</div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;    </div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingCollector_isReady(tZeroCrossingCollector* <span class="keyword">const</span> zc);</div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;    <span class="keywordtype">float</span>   tZeroCrossingCollector_getPeak(tZeroCrossingCollector* <span class="keyword">const</span> zc);</div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;    <span class="keywordtype">int</span>     tZeroCrossingCollector_isReset(tZeroCrossingCollector* <span class="keyword">const</span> zc);</div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;    </div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;    tZeroCrossingInfo <span class="keyword">const</span> tZeroCrossingCollector_getCrossing(tZeroCrossingCollector* <span class="keyword">const</span> zc, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160; </div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;    <span class="keywordtype">void</span>    tZeroCrossingCollector_setHysteresis(tZeroCrossingCollector* <span class="keyword">const</span> zc, <span class="keywordtype">float</span> hysteresis);</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;    </div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;    </div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tBitset</div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;    {</div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;        </div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;        </div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _value_size;</div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _size;</div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _bit_size;</div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* _bits;</div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;    } _tBitset;</div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;    </div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;    <span class="keyword">typedef</span> _tBitset* tBitset;</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;    </div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;    <span class="keywordtype">void</span>    tBitset_init    (tBitset* <span class="keyword">const</span> bitset, <span class="keywordtype">int</span> numBits, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;    <span class="keywordtype">void</span>    tBitset_initToPool  (tBitset* <span class="keyword">const</span> bitset, <span class="keywordtype">int</span> numBits, tMempool* <span class="keyword">const</span> mempool);</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;    <span class="keywordtype">void</span>    tBitset_free    (tBitset* <span class="keyword">const</span> bitset);</div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;    </div>
<div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;    <span class="keywordtype">int</span>     tBitset_get     (tBitset* <span class="keyword">const</span> bitset, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*   tBitset_getData   (tBitset* <span class="keyword">const</span> bitset);</div>
<div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;    </div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;    <span class="keywordtype">void</span>    tBitset_set     (tBitset* <span class="keyword">const</span> bitset, <span class="keywordtype">int</span> index, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val);</div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;    <span class="keywordtype">void</span>    tBitset_setMultiple (tBitset* <span class="keyword">const</span> bitset, <span class="keywordtype">int</span> index, <span class="keywordtype">int</span> n, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val);</div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160; </div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;    <span class="keywordtype">int</span>     tBitset_getSize (tBitset* <span class="keyword">const</span> bitset);</div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;    <span class="keywordtype">void</span>    tBitset_clear   (tBitset* <span class="keyword">const</span> bitset);</div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160; </div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;    </div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;    </div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tBACF</div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;    {</div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;        </div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;        </div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;        tBitset _bitset;</div>
<div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _mid_array;</div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;    } _tBACF;</div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;    </div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;    <span class="keyword">typedef</span> _tBACF* tBACF;</div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;    </div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;    <span class="keywordtype">void</span>    tBACF_init  (tBACF* <span class="keyword">const</span> bacf, tBitset* <span class="keyword">const</span> bitset, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;    <span class="keywordtype">void</span>    tBACF_initToPool    (tBACF* <span class="keyword">const</span> bacf, tBitset* <span class="keyword">const</span> bitset, tMempool* <span class="keyword">const</span> mempool);</div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;    <span class="keywordtype">void</span>    tBACF_free  (tBACF* <span class="keyword">const</span> bacf);</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;    </div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;    <span class="keywordtype">int</span>     tBACF_getCorrelation    (tBACF* <span class="keyword">const</span> bacf, <span class="keywordtype">int</span> pos);</div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;    <span class="keywordtype">void</span>    tBACF_set  (tBACF* <span class="keyword">const</span> bacf, tBitset* <span class="keyword">const</span> bitset);</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;    </div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;    </div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;<span class="preprocessor">#define PULSE_THRESHOLD 0.6f</span></div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;<span class="preprocessor">#define HARMONIC_PERIODICITY_FACTOR 16 //16</span></div>
<div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;<span class="preprocessor">#define PERIODICITY_DIFF_FACTOR 0.008f //0.008f</span></div>
<div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;    </div>
<div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_auto_correlation_info</div>
<div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;    {</div>
<div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;        <span class="keywordtype">int</span>               _i1;<span class="comment">// = -1;</span></div>
<div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;        <span class="keywordtype">int</span>               _i2;<span class="comment">// = -1;</span></div>
<div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;        <span class="keywordtype">int</span>               _period;<span class="comment">// = -1;</span></div>
<div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;        <span class="keywordtype">float</span>             _periodicity;<span class="comment">// = 0.0f;</span></div>
<div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>      _harmonic;</div>
<div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;    } _auto_correlation_info;</div>
<div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;    </div>
<div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_sub_collector</div>
<div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;    {</div>
<div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;        </div>
<div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;        </div>
<div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;        <span class="keywordtype">float</span>             _first_period;</div>
<div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;        </div>
<div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;        _auto_correlation_info _fundamental;</div>
<div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;        </div>
<div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;        <span class="comment">// passed in, not initialized</span></div>
<div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;        tZeroCrossingCollector    _zc;</div>
<div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;        </div>
<div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;        <span class="keywordtype">float</span>             _harmonic_threshold;</div>
<div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;        <span class="keywordtype">float</span>             _periodicity_diff_threshold;</div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;        <span class="keywordtype">int</span>               _range;</div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;    } _sub_collector;</div>
<div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160; </div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_period_info</div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;    {</div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;        <span class="keywordtype">float</span> period; <span class="comment">// -1.0f</span></div>
<div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;        <span class="keywordtype">float</span> periodicity;</div>
<div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;    } _period_info;</div>
<div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160; </div>
<div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tPeriodDetector</div>
<div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;    {</div>
<div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160;        </div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;        tZeroCrossingCollector          _zc;</div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;        _period_info            _fundamental;</div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            _min_period;</div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;        <span class="keywordtype">int</span>                     _range;</div>
<div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;        tBitset                 _bits;</div>
<div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;        <span class="keywordtype">float</span>                   _weight;</div>
<div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            _mid_point;</div>
<div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160;        <span class="keywordtype">float</span>                   _periodicity_diff_threshold;</div>
<div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;        <span class="keywordtype">float</span>                   _predicted_period;<span class="comment">// = -1.0f;</span></div>
<div class="line"><a name="l00843"></a><span class="lineno">  843</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            _edge_mark;<span class="comment">// = 0;</span></div>
<div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            _predict_edge;<span class="comment">// = 0;</span></div>
<div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            _num_pulses; <span class="comment">// = 0;</span></div>
<div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;        <span class="keywordtype">int</span>                     _half_empty; <span class="comment">// 0;</span></div>
<div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;        </div>
<div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;        tBACF                   _bacf;</div>
<div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;        </div>
<div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;    } _tPeriodDetector;</div>
<div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;    </div>
<div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;    <span class="keyword">typedef</span> _tPeriodDetector* tPeriodDetector;</div>
<div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;    </div>
<div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetector.html#gaa0947f407eba0d205dfdb3f5221e8a68">tPeriodDetector_init</a>    (tPeriodDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> lowestFreq, <span class="keywordtype">float</span> highestFreq, <span class="keywordtype">float</span> hysteresis, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetector.html#ga03431f353481718a4e573f4df4a0161f">tPeriodDetector_initToPool</a>  (tPeriodDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> lowestFreq, <span class="keywordtype">float</span> highestFreq, <span class="keywordtype">float</span> hysteresis, tMempool* <span class="keyword">const</span> mempool);</div>
<div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetector.html#ga55e2ad80c68f2fbf0cafceee206abf3f">tPeriodDetector_free</a>    (tPeriodDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;    </div>
<div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tperioddetector.html#gaed4bf4a51580ba6209dfe5d35a235644">tPeriodDetector_tick</a>    (tPeriodDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> sample);</div>
<div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;    </div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;    <span class="comment">// get the periodicity for a given harmonic</span></div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tperioddetector.html#ga025e1bc096ca88fc2f6e493513f0d6fb">tPeriodDetector_getPeriod</a>   (tPeriodDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tperioddetector.html#ga9e836c21a0dcabe9f3438bc56e671f39">tPeriodDetector_getPeriodicity</a>  (tPeriodDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tperioddetector.html#ga4a66a46a4a6bea562bae63640e6855a5">tPeriodDetector_harmonic</a>    (tPeriodDetector* <span class="keyword">const</span> detector, <span class="keywordtype">int</span> harmonicIndex);</div>
<div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tperioddetector.html#ga6bea587938466ba988a6e716446975ed">tPeriodDetector_predictPeriod</a>   (tPeriodDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tperioddetector.html#ga3d58e36fafa3e5b5102175e2c9062010">tPeriodDetector_isReady</a> (tPeriodDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tperioddetector.html#gad7d111b4c8dc6e7428ff2facdf90092a">tPeriodDetector_isReset</a> (tPeriodDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160; </div>
<div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tperioddetector.html#ga3157c7b7e210eafb0286aef6f1843f94">tPeriodDetector_setHysteresis</a>   (tPeriodDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> hysteresis);</div>
<div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;    </div>
<div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;    </div>
<div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160;<span class="preprocessor">#define ONSET_PERIODICITY 0.95f</span></div>
<div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;<span class="preprocessor">#define MIN_PERIODICITY 0.9f</span></div>
<div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160;<span class="preprocessor">#define DEFAULT_HYSTERESIS -200.0f</span></div>
<div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160; </div>
<div class="line"><a name="l00930"></a><span class="lineno">  930</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_pitch_info</div>
<div class="line"><a name="l00931"></a><span class="lineno">  931</span>&#160;    {</div>
<div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160;        <span class="keywordtype">float</span> frequency;</div>
<div class="line"><a name="l00933"></a><span class="lineno">  933</span>&#160;        <span class="keywordtype">float</span> periodicity;</div>
<div class="line"><a name="l00934"></a><span class="lineno">  934</span>&#160;    } _pitch_info;</div>
<div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160;    </div>
<div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tPitchDetector</div>
<div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;    {</div>
<div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160;        </div>
<div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;        </div>
<div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;        tPeriodDetector _pd;</div>
<div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;        _pitch_info _current;</div>
<div class="line"><a name="l00943"></a><span class="lineno">  943</span>&#160;        <span class="keywordtype">int</span> _frames_after_shift;<span class="comment">// = 0;</span></div>
<div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;        </div>
<div class="line"><a name="l00945"></a><span class="lineno">  945</span>&#160;    } _tPitchDetector;</div>
<div class="line"><a name="l00946"></a><span class="lineno">  946</span>&#160;    </div>
<div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;    <span class="keyword">typedef</span> _tPitchDetector* tPitchDetector;</div>
<div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;    </div>
<div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpitchdetector.html#ga99e55d649e58523aa706c711082585f6">tPitchDetector_init</a> (tPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> lowestFreq, <span class="keywordtype">float</span> highestFreq, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpitchdetector.html#gaaa325f08c7c80ecace14fcd7f934d211">tPitchDetector_initToPool</a>   (tPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> lowestFreq, <span class="keywordtype">float</span> highestFreq, tMempool* <span class="keyword">const</span> mempool);</div>
<div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpitchdetector.html#ga21a8caf85569fa4366e83aa776831273">tPitchDetector_free</a> (tPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;    </div>
<div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tpitchdetector.html#ga7ff9d62bb716a57fce8ffeb5558c4890">tPitchDetector_tick</a>    (tPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> sample);</div>
<div class="line"><a name="l00954"></a><span class="lineno">  954</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tpitchdetector.html#ga5b4f011cdb1812ab29022e4851e81c7e">tPitchDetector_getFrequency</a>    (tPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tpitchdetector.html#gad99b1eb3569ac87a54a31ddc7ec78eea">tPitchDetector_getPeriodicity</a>  (tPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tpitchdetector.html#gae830c20dc77369d3055f23cd0fc51435">tPitchDetector_harmonic</a>    (tPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">int</span> harmonicIndex);</div>
<div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tpitchdetector.html#gab29d82d5391480c9310b9c5074576966">tPitchDetector_predictFrequency</a> (tPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160;    <span class="keywordtype">int</span>     tPitchDetector_indeterminate    (tPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l00959"></a><span class="lineno">  959</span>&#160;    </div>
<div class="line"><a name="l00960"></a><span class="lineno">  960</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpitchdetector.html#ga65ead0c2f0f3f30b2e64f5a6aa50d6f9">tPitchDetector_setHysteresis</a>    (tPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> hysteresis);</div>
<div class="line"><a name="l00961"></a><span class="lineno">  961</span>&#160;    </div>
<div class="line"><a name="l00962"></a><span class="lineno">  962</span>&#160;    </div>
<div class="line"><a name="l00963"></a><span class="lineno">  963</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;    </div>
<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tDualPitchDetector</div>
<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;    {</div>
<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;        </div>
<div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;        tPeriodDetection _pd1;</div>
<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;        tPitchDetector _pd2;</div>
<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;        _pitch_info _current;</div>
<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;        <span class="keywordtype">float</span> _mean;</div>
<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;        <span class="keywordtype">float</span> _predicted_frequency;</div>
<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;        <span class="keywordtype">int</span> _first;</div>
<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;        </div>
<div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;        <span class="keywordtype">float</span> highest, lowest;</div>
<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;        <span class="keywordtype">float</span> thresh;</div>
<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160; </div>
<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160;    } _tDualPitchDetector;</div>
<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;    </div>
<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;    <span class="keyword">typedef</span> _tDualPitchDetector* tDualPitchDetector;</div>
<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;    </div>
<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tdualpitchdetector.html#gae41a404e3b1463d626423aa6f4ac56a6">tDualPitchDetector_init</a> (tDualPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> lowestFreq, <span class="keywordtype">float</span> highestFreq, <span class="keywordtype">float</span>* inBuffer, <span class="keywordtype">int</span> bufSize, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tdualpitchdetector.html#gaf9fbf5ecd92f356af0572600ec796556">tDualPitchDetector_initToPool</a>   (tDualPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> lowestFreq, <span class="keywordtype">float</span> highestFreq, <span class="keywordtype">float</span>* inBuffer, <span class="keywordtype">int</span> bufSize, tMempool* <span class="keyword">const</span> mempool);</div>
<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tdualpitchdetector.html#ga0f104dc5171d8cf3cf5e01d3d52f20e4">tDualPitchDetector_free</a> (tDualPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;    </div>
<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tdualpitchdetector.html#ga25d99f2df26169355fda4810802f7b87">tDualPitchDetector_tick</a>    (tDualPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> sample);</div>
<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tdualpitchdetector.html#gae647948c3fad09263e02625d52a0f9f0">tDualPitchDetector_getFrequency</a>    (tDualPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tdualpitchdetector.html#ga013b0b209ac1fe9268f88ed4925c7905">tDualPitchDetector_getPeriodicity</a>  (tDualPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tdualpitchdetector.html#gaa80b5da1c459f61396d95066cf8fdbfe">tDualPitchDetector_harmonic</a>    (tDualPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">int</span> harmonicIndex);</div>
<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tdualpitchdetector.html#gab5e594fb81c3c6e5c3f3d58a5f98c504">tDualPitchDetector_predictFrequency</a> (tDualPitchDetector* <span class="keyword">const</span> detector);</div>
<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160;    </div>
<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tdualpitchdetector.html#ga0a511f71335134377f4db13f9b6c311e">tDualPitchDetector_setHysteresis</a>    (tDualPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> hysteresis);</div>
<div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tdualpitchdetector.html#gaf1a678d94ea5579c8847e8672541fecd">tDualPitchDetector_setPeriodicityThreshold</a> (tDualPitchDetector* <span class="keyword">const</span> detector, <span class="keywordtype">float</span> thresh);</div>
<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;    </div>
<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;    </div>
<div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160;    </div>
<div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160;    </div>
<div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160;}</div>
<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160; </div>
<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;<span class="preprocessor">#endif  // LEAF_ANALYSIS_H_INCLUDED</span></div>
<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160; </div>
<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;<span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160; </div>
<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160; </div>
<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160; </div>
<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160; </div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="agroup__tperioddetector_html_gaa0947f407eba0d205dfdb3f5221e8a68"><div class="ttname"><a href="group__tperioddetector.html#gaa0947f407eba0d205dfdb3f5221e8a68">tPeriodDetector_init</a></div><div class="ttdeci">void tPeriodDetector_init(tPeriodDetector *const detector, float lowestFreq, float highestFreq, float hysteresis, LEAF *const leaf)</div><div class="ttdoc">Initialize a tPeriodDetector to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1505</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_ga25d99f2df26169355fda4810802f7b87"><div class="ttname"><a href="group__tdualpitchdetector.html#ga25d99f2df26169355fda4810802f7b87">tDualPitchDetector_tick</a></div><div class="ttdeci">int tDualPitchDetector_tick(tDualPitchDetector *const detector, float sample)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2152</div></div>
<div class="ttc" id="agroup__tattackdetection_html_ga159b77e3617708f63d34705f66891eca"><div class="ttname"><a href="group__tattackdetection.html#ga159b77e3617708f63d34705f66891eca">tAttackDetection_initToPool</a></div><div class="ttdeci">void tAttackDetection_initToPool(tAttackDetection *const, int blocksize, int atk, int rel, tMempool *const)</div><div class="ttdoc">Initialize a tAttackDetection to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:343</div></div>
<div class="ttc" id="agroup__tattackdetection_html_ga849d76be546d42e00dcfaee4ca326adb"><div class="ttname"><a href="group__tattackdetection.html#ga849d76be546d42e00dcfaee4ca326adb">tAttackDetection_setRelease</a></div><div class="ttdeci">void tAttackDetection_setRelease(tAttackDetection *const, int inRel)</div><div class="ttdoc">Set release time and coeff.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:393</div></div>
<div class="ttc" id="agroup__tperioddetector_html_gad7d111b4c8dc6e7428ff2facdf90092a"><div class="ttname"><a href="group__tperioddetector.html#gad7d111b4c8dc6e7428ff2facdf90092a">tPeriodDetector_isReset</a></div><div class="ttdeci">int tPeriodDetector_isReset(tPeriodDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1652</div></div>
<div class="ttc" id="agroup__tsnac_html_ga777b3cb40c7dcb7826b0945358ffe1ec"><div class="ttname"><a href="group__tsnac.html#ga777b3cb40c7dcb7826b0945358ffe1ec">tSNAC_setMinRMS</a></div><div class="ttdeci">void tSNAC_setMinRMS(tSNAC *s, float rms)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:566</div></div>
<div class="ttc" id="agroup__tsnac_html_gab6a4ff9c52fb26d19f3bc4d080f91845"><div class="ttname"><a href="group__tsnac.html#gab6a4ff9c52fb26d19f3bc4d080f91845">tSNAC_setOverlap</a></div><div class="ttdeci">void tSNAC_setOverlap(tSNAC *s, int lap)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:547</div></div>
<div class="ttc" id="agroup__tpowerfollower_html_ga0b422a35ef8ccdd72b3db45fc53c1e96"><div class="ttname"><a href="group__tpowerfollower.html#ga0b422a35ef8ccdd72b3db45fc53c1e96">tPowerFollower_tick</a></div><div class="ttdeci">float tPowerFollower_tick(tPowerFollower *const, float input)</div><div class="ttdoc">Pass a sample into the power follower and return the current power.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:210</div></div>
<div class="ttc" id="agroup__tpowerfollower_html_ga726f0b8ec4ab97346fb8521934452a2e"><div class="ttname"><a href="group__tpowerfollower.html#ga726f0b8ec4ab97346fb8521934452a2e">tPowerFollower_initToPool</a></div><div class="ttdeci">void tPowerFollower_initToPool(tPowerFollower *const, float factor, tMempool *const)</div><div class="ttdoc">Initialize a tPowerFollower to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:182</div></div>
<div class="ttc" id="agroup__tperioddetection_html_ga2249345fb1cb419173b35ef258cf4248"><div class="ttname"><a href="group__tperioddetection.html#ga2249345fb1cb419173b35ef258cf4248">tPeriodDetection_setFidelityThreshold</a></div><div class="ttdeci">void tPeriodDetection_setFidelityThreshold(tPeriodDetection *const, float threshold)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:936</div></div>
<div class="ttc" id="agroup__tsnac_html_ga3dbb9845079ebe1b3dbba647180a1168"><div class="ttname"><a href="group__tsnac.html#ga3dbb9845079ebe1b3dbba647180a1168">tSNAC_setBias</a></div><div class="ttdeci">void tSNAC_setBias(tSNAC *s, float bias)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:555</div></div>
<div class="ttc" id="agroup__tattackdetection_html_ga628b4e4305fb135f7f363b94a209cb37"><div class="ttname"><a href="group__tattackdetection.html#ga628b4e4305fb135f7f363b94a209cb37">tAttackDetection_detect</a></div><div class="ttdeci">int tAttackDetection_detect(tAttackDetection *const, float *in)</div><div class="ttdoc">Find the largest transient in input block, return index of attack.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:401</div></div>
<div class="ttc" id="agroup__tattackdetection_html_gafc1088d0fc65cb8c9ca3e219dc6ee23e"><div class="ttname"><a href="group__tattackdetection.html#gafc1088d0fc65cb8c9ca3e219dc6ee23e">tAttackDetection_setSamplerate</a></div><div class="ttdeci">void tAttackDetection_setSamplerate(tAttackDetection *const, int inRate)</div><div class="ttdoc">Set attack detection sample rate.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:369</div></div>
<div class="ttc" id="agroup__tattackdetection_html_gae1258e29699c07368168a5a06e847c1c"><div class="ttname"><a href="group__tattackdetection.html#gae1258e29699c07368168a5a06e847c1c">tAttackDetection_setAttack</a></div><div class="ttdeci">void tAttackDetection_setAttack(tAttackDetection *const, int inAtk)</div><div class="ttdoc">Set attack time and coeff.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:386</div></div>
<div class="ttc" id="agroup__tzerocrossingcounter_html_ga7810cc03d693da0d9752b61f5320d01b"><div class="ttname"><a href="group__tzerocrossingcounter.html#ga7810cc03d693da0d9752b61f5320d01b">tZeroCrossingCounter_setWindowSize</a></div><div class="ttdeci">void tZeroCrossingCounter_setWindowSize(tZeroCrossingCounter *const, float windowSize)</div><div class="ttdoc">Set the size of the window. Cannot be greater than the max size given on initialization.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:156</div></div>
<div class="ttc" id="agroup__tperioddetection_html_ga94c9cff1d6cb0f0d6a70fdeb8764cdb0"><div class="ttname"><a href="group__tperioddetection.html#ga94c9cff1d6cb0f0d6a70fdeb8764cdb0">tPeriodDetection_free</a></div><div class="ttdeci">void tPeriodDetection_free(tPeriodDetection *const)</div><div class="ttdoc">Free a tPeriodDetection from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:868</div></div>
<div class="ttc" id="agroup__tperioddetector_html_ga6bea587938466ba988a6e716446975ed"><div class="ttname"><a href="group__tperioddetector.html#ga6bea587938466ba988a6e716446975ed">tPeriodDetector_predictPeriod</a></div><div class="ttdeci">float tPeriodDetector_predictPeriod(tPeriodDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1611</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_gaa80b5da1c459f61396d95066cf8fdbfe"><div class="ttname"><a href="group__tdualpitchdetector.html#gaa80b5da1c459f61396d95066cf8fdbfe">tDualPitchDetector_harmonic</a></div><div class="ttdeci">float tDualPitchDetector_harmonic(tDualPitchDetector *const detector, int harmonicIndex)</div></div>
<div class="ttc" id="agroup__tenvpd_html_ga49c2752feb9890d139e296e75ea74b9b"><div class="ttname"><a href="group__tenvpd.html#ga49c2752feb9890d139e296e75ea74b9b">tEnvPD_init</a></div><div class="ttdeci">void tEnvPD_init(tEnvPD *const, int windowSize, int hopSize, int blockSize, LEAF *const leaf)</div><div class="ttdoc">Initialize a tEnvPD to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:230</div></div>
<div class="ttc" id="agroup__tenvpd_html_ga28ade0e2893d6e94bca4dfa6cdd0f0ea"><div class="ttname"><a href="group__tenvpd.html#ga28ade0e2893d6e94bca4dfa6cdd0f0ea">tEnvPD_free</a></div><div class="ttdeci">void tEnvPD_free(tEnvPD *const)</div><div class="ttdoc">Free a tEnvPD from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:279</div></div>
<div class="ttc" id="agroup__tattackdetection_html_gaa7cf7c473a720eb6e034661a92a9164a"><div class="ttname"><a href="group__tattackdetection.html#gaa7cf7c473a720eb6e034661a92a9164a">tAttackDetection_init</a></div><div class="ttdeci">void tAttackDetection_init(tAttackDetection *const, int blocksize, int atk, int rel, LEAF *const leaf)</div><div class="ttdoc">Initialize a tAttackDetection to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:338</div></div>
<div class="ttc" id="agroup__tenvelopefollower_html_ga746d0a9698c22b21091cc6fad79faf85"><div class="ttname"><a href="group__tenvelopefollower.html#ga746d0a9698c22b21091cc6fad79faf85">tEnvelopeFollower_setDecayCoefficient</a></div><div class="ttdeci">void tEnvelopeFollower_setDecayCoefficient(tEnvelopeFollower *const follower, float decayCoefficient)</div><div class="ttdoc">Set the envelope decay coefficient.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:68</div></div>
<div class="ttc" id="agroup__tzerocrossingcounter_html_gab53550020f2625049537b65655af0053"><div class="ttname"><a href="group__tzerocrossingcounter.html#gab53550020f2625049537b65655af0053">tZeroCrossingCounter_tick</a></div><div class="ttdeci">float tZeroCrossingCounter_tick(tZeroCrossingCounter *const, float input)</div><div class="ttdoc">Tick the tZeroCrossingCounter.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:117</div></div>
<div class="ttc" id="agroup__tattackdetection_html_gac0cecbd3eb9478a8ac62ad056b4e65e8"><div class="ttname"><a href="group__tattackdetection.html#gac0cecbd3eb9478a8ac62ad056b4e65e8">tAttackDetection_free</a></div><div class="ttdeci">void tAttackDetection_free(tAttackDetection *const)</div><div class="ttdoc">Free a tAttackDetection from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:352</div></div>
<div class="ttc" id="agroup__tsnac_html_ga8568190ff50745df3b220f9f8dba3289"><div class="ttname"><a href="group__tsnac.html#ga8568190ff50745df3b220f9f8dba3289">tSNAC_getFidelity</a></div><div class="ttdeci">float tSNAC_getFidelity(tSNAC *s)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:583</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_ga99e55d649e58523aa706c711082585f6"><div class="ttname"><a href="group__tpitchdetector.html#ga99e55d649e58523aa706c711082585f6">tPitchDetector_init</a></div><div class="ttdeci">void tPitchDetector_init(tPitchDetector *const detector, float lowestFreq, float highestFreq, LEAF *const leaf)</div><div class="ttdoc">Initialize a tPitchDetector to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1887</div></div>
<div class="ttc" id="agroup__tenvpd_html_ga31446fa14ee57bd0f19d260f4c748e2e"><div class="ttname"><a href="group__tenvpd.html#ga31446fa14ee57bd0f19d260f4c748e2e">tEnvPD_initToPool</a></div><div class="ttdeci">void tEnvPD_initToPool(tEnvPD *const, int windowSize, int hopSize, int blockSize, tMempool *const)</div><div class="ttdoc">Initialize a tEnvPD to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:235</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_gab5e594fb81c3c6e5c3f3d58a5f98c504"><div class="ttname"><a href="group__tdualpitchdetector.html#gab5e594fb81c3c6e5c3f3d58a5f98c504">tDualPitchDetector_predictFrequency</a></div><div class="ttdeci">float tDualPitchDetector_predictFrequency(tDualPitchDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2249</div></div>
<div class="ttc" id="agroup__tperioddetection_html_ga95602fa326fda0ab685a626508166d15"><div class="ttname"><a href="group__tperioddetection.html#ga95602fa326fda0ab685a626508166d15">tPeriodDetection_setAlpha</a></div><div class="ttdeci">void tPeriodDetection_setAlpha(tPeriodDetection *const, float alpha)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:942</div></div>
<div class="ttc" id="agroup__tsnac_html_ga5f4005dba1c0470e84ae6bc6845c6d27"><div class="ttname"><a href="group__tsnac.html#ga5f4005dba1c0470e84ae6bc6845c6d27">tSNAC_init</a></div><div class="ttdeci">void tSNAC_init(tSNAC *const, int overlaparg, LEAF *const leaf)</div><div class="ttdoc">Initialize a tSNAC to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:479</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_gae647948c3fad09263e02625d52a0f9f0"><div class="ttname"><a href="group__tdualpitchdetector.html#gae647948c3fad09263e02625d52a0f9f0">tDualPitchDetector_getFrequency</a></div><div class="ttdeci">float tDualPitchDetector_getFrequency(tDualPitchDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2235</div></div>
<div class="ttc" id="agroup__tpowerfollower_html_gab8b92e4b8a0819f2d0a779f3b20d3f25"><div class="ttname"><a href="group__tpowerfollower.html#gab8b92e4b8a0819f2d0a779f3b20d3f25">tPowerFollower_init</a></div><div class="ttdeci">void tPowerFollower_init(tPowerFollower *const, float factor, LEAF *const leaf)</div><div class="ttdoc">Initialize a tPowerFollower to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:177</div></div>
<div class="ttc" id="agroup__tperioddetection_html_ga18cf97615547a615aec4b183da82e8ee"><div class="ttname"><a href="group__tperioddetection.html#ga18cf97615547a615aec4b183da82e8ee">tPeriodDetection_tick</a></div><div class="ttdeci">float tPeriodDetection_tick(tPeriodDetection *const, float sample)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:877</div></div>
<div class="ttc" id="agroup__tperioddetector_html_ga03431f353481718a4e573f4df4a0161f"><div class="ttname"><a href="group__tperioddetector.html#ga03431f353481718a4e573f4df4a0161f">tPeriodDetector_initToPool</a></div><div class="ttdeci">void tPeriodDetector_initToPool(tPeriodDetector *const detector, float lowestFreq, float highestFreq, float hysteresis, tMempool *const mempool)</div><div class="ttdoc">Initialize a tPeriodDetector to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1510</div></div>
<div class="ttc" id="agroup__tperioddetector_html_ga3d58e36fafa3e5b5102175e2c9062010"><div class="ttname"><a href="group__tperioddetector.html#ga3d58e36fafa3e5b5102175e2c9062010">tPeriodDetector_isReady</a></div><div class="ttdeci">int tPeriodDetector_isReady(tPeriodDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1645</div></div>
<div class="ttc" id="agroup__tenvelopefollower_html_ga5a7749052924bc7ed03051043b5e42bb"><div class="ttname"><a href="group__tenvelopefollower.html#ga5a7749052924bc7ed03051043b5e42bb">tEnvelopeFollower_init</a></div><div class="ttdeci">void tEnvelopeFollower_init(tEnvelopeFollower *const follower, float attackThreshold, float decayCoefficient, LEAF *const leaf)</div><div class="ttdoc">Initialize a tEnvelopeFollower to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:25</div></div>
<div class="ttc" id="agroup__tenvpd_html_ga73ca443b1b36dc5995bf1659fdb242ab"><div class="ttname"><a href="group__tenvpd.html#ga73ca443b1b36dc5995bf1659fdb242ab">tEnvPD_tick</a></div><div class="ttdeci">float tEnvPD_tick(tEnvPD *const)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:286</div></div>
<div class="ttc" id="agroup__tzerocrossingcounter_html_ga797b0ef62ada70b352a22426a9915ae6"><div class="ttname"><a href="group__tzerocrossingcounter.html#ga797b0ef62ada70b352a22426a9915ae6">tZeroCrossingCounter_initToPool</a></div><div class="ttdeci">void tZeroCrossingCounter_initToPool(tZeroCrossingCounter *const, int maxWindowSize, tMempool *const mempool)</div><div class="ttdoc">Initialize a tZeroCrossingCounter to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:91</div></div>
<div class="ttc" id="agroup__tperioddetector_html_ga3157c7b7e210eafb0286aef6f1843f94"><div class="ttname"><a href="group__tperioddetector.html#ga3157c7b7e210eafb0286aef6f1843f94">tPeriodDetector_setHysteresis</a></div><div class="ttdeci">void tPeriodDetector_setHysteresis(tPeriodDetector *const detector, float hysteresis)</div><div class="ttdoc">Set the hysteresis used in zero crossing detection.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1659</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_ga65ead0c2f0f3f30b2e64f5a6aa50d6f9"><div class="ttname"><a href="group__tpitchdetector.html#ga65ead0c2f0f3f30b2e64f5a6aa50d6f9">tPitchDetector_setHysteresis</a></div><div class="ttdeci">void tPitchDetector_setHysteresis(tPitchDetector *const detector, float hysteresis)</div><div class="ttdoc">Set the hysteresis used in zero crossing detection.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2002</div></div>
<div class="ttc" id="agroup__tperioddetector_html_ga025e1bc096ca88fc2f6e493513f0d6fb"><div class="ttname"><a href="group__tperioddetector.html#ga025e1bc096ca88fc2f6e493513f0d6fb">tPeriodDetector_getPeriod</a></div><div class="ttdeci">float tPeriodDetector_getPeriod(tPeriodDetector *const detector)</div><div class="ttdoc">Get the periodicity for a given harmonic of the detected pitch.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1577</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_gae41a404e3b1463d626423aa6f4ac56a6"><div class="ttname"><a href="group__tdualpitchdetector.html#gae41a404e3b1463d626423aa6f4ac56a6">tDualPitchDetector_init</a></div><div class="ttdeci">void tDualPitchDetector_init(tDualPitchDetector *const detector, float lowestFreq, float highestFreq, float *inBuffer, int bufSize, LEAF *const leaf)</div><div class="ttdoc">Initialize a tDualPitchDetector to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2117</div></div>
<div class="ttc" id="agroup__tenvelopefollower_html_gadd57dad9c08b2ada6e8c720077256d5a"><div class="ttname"><a href="group__tenvelopefollower.html#gadd57dad9c08b2ada6e8c720077256d5a">tEnvelopeFollower_tick</a></div><div class="ttdeci">float tEnvelopeFollower_tick(tEnvelopeFollower *const follower, float sample)</div><div class="ttdoc">Tick the tEnvelopeFollower.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:48</div></div>
<div class="ttc" id="agroup__tperioddetection_html_ga9a3ed4fe9806b0ee691b56090cef4339"><div class="ttname"><a href="group__tperioddetection.html#ga9a3ed4fe9806b0ee691b56090cef4339">tPeriodDetection_setWindowSize</a></div><div class="ttdeci">void tPeriodDetection_setWindowSize(tPeriodDetection *const, int ws)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:930</div></div>
<div class="ttc" id="agroup__tenvpd_html_ga15bd0b8018ca2c67120053eb8cd1fc9a"><div class="ttname"><a href="group__tenvpd.html#ga15bd0b8018ca2c67120053eb8cd1fc9a">tEnvPD_processBlock</a></div><div class="ttdeci">void tEnvPD_processBlock(tEnvPD *const, float *in)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:292</div></div>
<div class="ttc" id="agroup__tpowerfollower_html_gac7ab521ba7345c90b2455acc66a7caf1"><div class="ttname"><a href="group__tpowerfollower.html#gac7ab521ba7345c90b2455acc66a7caf1">tPowerFollower_setFactor</a></div><div class="ttdeci">void tPowerFollower_setFactor(tPowerFollower *const, float factor)</div><div class="ttdoc">Set the smoothing factor for the moving average.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:200</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_ga0a511f71335134377f4db13f9b6c311e"><div class="ttname"><a href="group__tdualpitchdetector.html#ga0a511f71335134377f4db13f9b6c311e">tDualPitchDetector_setHysteresis</a></div><div class="ttdeci">void tDualPitchDetector_setHysteresis(tDualPitchDetector *const detector, float hysteresis)</div><div class="ttdoc">Set the hysteresis used in zero crossing detection.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2258</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_gab29d82d5391480c9310b9c5074576966"><div class="ttname"><a href="group__tpitchdetector.html#gab29d82d5391480c9310b9c5074576966">tPitchDetector_predictFrequency</a></div><div class="ttdeci">float tPitchDetector_predictFrequency(tPitchDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1984</div></div>
<div class="ttc" id="agroup__tperioddetector_html_ga55e2ad80c68f2fbf0cafceee206abf3f"><div class="ttname"><a href="group__tperioddetector.html#ga55e2ad80c68f2fbf0cafceee206abf3f">tPeriodDetector_free</a></div><div class="ttdeci">void tPeriodDetector_free(tPeriodDetector *const detector)</div><div class="ttdoc">Free a tPeriodDetector from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1537</div></div>
<div class="ttc" id="agroup__tperioddetection_html_ga04f0fa73e75e8fc128243515b039c474"><div class="ttname"><a href="group__tperioddetection.html#ga04f0fa73e75e8fc128243515b039c474">tPeriodDetection_getPeriod</a></div><div class="ttdeci">float tPeriodDetection_getPeriod(tPeriodDetection *const)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:912</div></div>
<div class="ttc" id="agroup__tperioddetector_html_ga9e836c21a0dcabe9f3438bc56e671f39"><div class="ttname"><a href="group__tperioddetector.html#ga9e836c21a0dcabe9f3438bc56e671f39">tPeriodDetector_getPeriodicity</a></div><div class="ttdeci">float tPeriodDetector_getPeriodicity(tPeriodDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1584</div></div>
<div class="ttc" id="agroup__tzerocrossingcounter_html_ga8fed3441e5ac46750e3f7641d8b5d80b"><div class="ttname"><a href="group__tzerocrossingcounter.html#ga8fed3441e5ac46750e3f7641d8b5d80b">tZeroCrossingCounter_init</a></div><div class="ttdeci">void tZeroCrossingCounter_init(tZeroCrossingCounter *const, int maxWindowSize, LEAF *const leaf)</div><div class="ttdoc">Initialize a tZeroCrossingCounter to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:86</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_ga7ff9d62bb716a57fce8ffeb5558c4890"><div class="ttname"><a href="group__tpitchdetector.html#ga7ff9d62bb716a57fce8ffeb5558c4890">tPitchDetector_tick</a></div><div class="ttdeci">int tPitchDetector_tick(tPitchDetector *const detector, float sample)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1912</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_gaf9fbf5ecd92f356af0572600ec796556"><div class="ttname"><a href="group__tdualpitchdetector.html#gaf9fbf5ecd92f356af0572600ec796556">tDualPitchDetector_initToPool</a></div><div class="ttdeci">void tDualPitchDetector_initToPool(tDualPitchDetector *const detector, float lowestFreq, float highestFreq, float *inBuffer, int bufSize, tMempool *const mempool)</div><div class="ttdoc">Initialize a tDualPitchDetector to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2122</div></div>
<div class="ttc" id="agroup__tattackdetection_html_ga330419a7bcf2aea460cbb8341d0cc7a1"><div class="ttname"><a href="group__tattackdetection.html#ga330419a7bcf2aea460cbb8341d0cc7a1">tAttackDetection_setBlocksize</a></div><div class="ttdeci">void tAttackDetection_setBlocksize(tAttackDetection *const, int size)</div><div class="ttdoc">Set expected input blocksize.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:362</div></div>
<div class="ttc" id="agroup__tperioddetector_html_ga4a66a46a4a6bea562bae63640e6855a5"><div class="ttname"><a href="group__tperioddetector.html#ga4a66a46a4a6bea562bae63640e6855a5">tPeriodDetector_harmonic</a></div><div class="ttdeci">float tPeriodDetector_harmonic(tPeriodDetector *const detector, int harmonicIndex)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1591</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_gad99b1eb3569ac87a54a31ddc7ec78eea"><div class="ttname"><a href="group__tpitchdetector.html#gad99b1eb3569ac87a54a31ddc7ec78eea">tPitchDetector_getPeriodicity</a></div><div class="ttdeci">float tPitchDetector_getPeriodicity(tPitchDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1970</div></div>
<div class="ttc" id="agroup__tzerocrossingcounter_html_gaa1865545e8a1ac340af315e77547e75b"><div class="ttname"><a href="group__tzerocrossingcounter.html#gaa1865545e8a1ac340af315e77547e75b">tZeroCrossingCounter_free</a></div><div class="ttdeci">void tZeroCrossingCounter_free(tZeroCrossingCounter *const)</div><div class="ttdoc">Free a tZeroCrossingCounter from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:107</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_gaf1a678d94ea5579c8847e8672541fecd"><div class="ttname"><a href="group__tdualpitchdetector.html#gaf1a678d94ea5579c8847e8672541fecd">tDualPitchDetector_setPeriodicityThreshold</a></div><div class="ttdeci">void tDualPitchDetector_setPeriodicityThreshold(tDualPitchDetector *const detector, float thresh)</div><div class="ttdoc">Set the threshold for periodicity of a signal to be considered as pitched.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2265</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_gaaa325f08c7c80ecace14fcd7f934d211"><div class="ttname"><a href="group__tpitchdetector.html#gaaa325f08c7c80ecace14fcd7f934d211">tPitchDetector_initToPool</a></div><div class="ttdeci">void tPitchDetector_initToPool(tPitchDetector *const detector, float lowestFreq, float highestFreq, tMempool *const mempool)</div><div class="ttdoc">Initialize a tPitchDetector to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1892</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_ga013b0b209ac1fe9268f88ed4925c7905"><div class="ttname"><a href="group__tdualpitchdetector.html#ga013b0b209ac1fe9268f88ed4925c7905">tDualPitchDetector_getPeriodicity</a></div><div class="ttdeci">float tDualPitchDetector_getPeriodicity(tDualPitchDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2242</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_ga21a8caf85569fa4366e83aa776831273"><div class="ttname"><a href="group__tpitchdetector.html#ga21a8caf85569fa4366e83aa776831273">tPitchDetector_free</a></div><div class="ttdeci">void tPitchDetector_free(tPitchDetector *const detector)</div><div class="ttdoc">Free a tPitchDetector from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1904</div></div>
<div class="ttc" id="agroup__tenvelopefollower_html_ga9d8d4762b016fa57939e5d733e164cb9"><div class="ttname"><a href="group__tenvelopefollower.html#ga9d8d4762b016fa57939e5d733e164cb9">tEnvelopeFollower_setAttackThreshold</a></div><div class="ttdeci">void tEnvelopeFollower_setAttackThreshold(tEnvelopeFollower *const follower, float attackThreshold)</div><div class="ttdoc">Set the envelope attack threshold.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:74</div></div>
<div class="ttc" id="agroup__tsnac_html_gad7fc6ce1e80847dfcd9da75d4c734f12"><div class="ttname"><a href="group__tsnac.html#gad7fc6ce1e80847dfcd9da75d4c734f12">tSNAC_free</a></div><div class="ttdeci">void tSNAC_free(tSNAC *const)</div><div class="ttdoc">Free a tSNAC from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:507</div></div>
<div class="ttc" id="agroup__tpowerfollower_html_ga479317d7fd22a86a832ebec92eae4782"><div class="ttname"><a href="group__tpowerfollower.html#ga479317d7fd22a86a832ebec92eae4782">tPowerFollower_free</a></div><div class="ttdeci">void tPowerFollower_free(tPowerFollower *const)</div><div class="ttdoc">Free a tPowerFollower from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:193</div></div>
<div class="ttc" id="agroup__tattackdetection_html_gafc46d23c20523048eaf45a68e146dbcf"><div class="ttname"><a href="group__tattackdetection.html#gafc46d23c20523048eaf45a68e146dbcf">tAttackDetection_setThreshold</a></div><div class="ttdeci">void tAttackDetection_setThreshold(tAttackDetection *const, float thres)</div><div class="ttdoc">Set level above which values are identified as attacks.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:380</div></div>
<div class="ttc" id="agroup__tperioddetection_html_ga207a7ec884eebc58c9cd9f17518d5a1b"><div class="ttname"><a href="group__tperioddetection.html#ga207a7ec884eebc58c9cd9f17518d5a1b">tPeriodDetection_setHopSize</a></div><div class="ttdeci">void tPeriodDetection_setHopSize(tPeriodDetection *const, int hs)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:924</div></div>
<div class="ttc" id="agroup__tenvelopefollower_html_ga9ff136abec8842d17d25205787370239"><div class="ttname"><a href="group__tenvelopefollower.html#ga9ff136abec8842d17d25205787370239">tEnvelopeFollower_free</a></div><div class="ttdeci">void tEnvelopeFollower_free(tEnvelopeFollower *const follower)</div><div class="ttdoc">Free a tEnvelopeFollower from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:41</div></div>
<div class="ttc" id="agroup__tperioddetector_html_gaed4bf4a51580ba6209dfe5d35a235644"><div class="ttname"><a href="group__tperioddetector.html#gaed4bf4a51580ba6209dfe5d35a235644">tPeriodDetector_tick</a></div><div class="ttdeci">int tPeriodDetector_tick(tPeriodDetector *const detector, float sample)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1548</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_ga5b4f011cdb1812ab29022e4851e81c7e"><div class="ttname"><a href="group__tpitchdetector.html#ga5b4f011cdb1812ab29022e4851e81c7e">tPitchDetector_getFrequency</a></div><div class="ttdeci">float tPitchDetector_getFrequency(tPitchDetector *const detector)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1963</div></div>
<div class="ttc" id="astruct_l_e_a_f_html"><div class="ttname"><a href="struct_l_e_a_f.html">LEAF</a></div><div class="ttdoc">Struct for an instance of LEAF.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:31</div></div>
<div class="ttc" id="agroup__tsnac_html_ga9779c23ab83bf93c8df11a6b4982c0b2"><div class="ttname"><a href="group__tsnac.html#ga9779c23ab83bf93c8df11a6b4982c0b2">tSNAC_initToPool</a></div><div class="ttdeci">void tSNAC_initToPool(tSNAC *const, int overlaparg, tMempool *const)</div><div class="ttdoc">Initialize a tSNAC to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:484</div></div>
<div class="ttc" id="agroup__tenvelopefollower_html_gacd6a2310494413b550ededdaed214d2a"><div class="ttname"><a href="group__tenvelopefollower.html#gacd6a2310494413b550ededdaed214d2a">tEnvelopeFollower_initToPool</a></div><div class="ttdeci">void tEnvelopeFollower_initToPool(tEnvelopeFollower *const follower, float attackThreshold, float decayCoefficient, tMempool *const mempool)</div><div class="ttdoc">Initialize a tEnvelopeFollower to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:30</div></div>
<div class="ttc" id="agroup__tperioddetection_html_ga49b5e95b84c6e101abac2ab7ec0cdebd"><div class="ttname"><a href="group__tperioddetection.html#ga49b5e95b84c6e101abac2ab7ec0cdebd">tPeriodDetection_setTolerance</a></div><div class="ttdeci">void tPeriodDetection_setTolerance(tPeriodDetection *const, float tolerance)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:948</div></div>
<div class="ttc" id="agroup__tdualpitchdetector_html_ga0f104dc5171d8cf3cf5e01d3d52f20e4"><div class="ttname"><a href="group__tdualpitchdetector.html#ga0f104dc5171d8cf3cf5e01d3d52f20e4">tDualPitchDetector_free</a></div><div class="ttdeci">void tDualPitchDetector_free(tDualPitchDetector *const detector)</div><div class="ttdoc">Free a tDualPitchDetector from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:2142</div></div>
<div class="ttc" id="agroup__tsnac_html_ga71074b5888fe76260f3c1fae7e2aeec8"><div class="ttname"><a href="group__tsnac.html#ga71074b5888fe76260f3c1fae7e2aeec8">tSNAC_getPeriod</a></div><div class="ttdeci">float tSNAC_getPeriod(tSNAC *s)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:576</div></div>
<div class="ttc" id="agroup__tpowerfollower_html_ga0a423e1c15b581b4430112ed2897f6d2"><div class="ttname"><a href="group__tpowerfollower.html#ga0a423e1c15b581b4430112ed2897f6d2">tPowerFollower_getPower</a></div><div class="ttdeci">float tPowerFollower_getPower(tPowerFollower *const)</div><div class="ttdoc">Get the current power.</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:217</div></div>
<div class="ttc" id="agroup__tpitchdetector_html_gae830c20dc77369d3055f23cd0fc51435"><div class="ttname"><a href="group__tpitchdetector.html#gae830c20dc77369d3055f23cd0fc51435">tPitchDetector_harmonic</a></div><div class="ttdeci">float tPitchDetector_harmonic(tPitchDetector *const detector, int harmonicIndex)</div><div class="ttdef"><b>Definition:</b> leaf-analysis.c:1977</div></div>
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
